@echo off
setlocal ENABLEDELAYEDEXPANSION

set "SCRIPT_DIR=%~dp0"
pushd "%SCRIPT_DIR%.."

where python >nul 2>nul
if errorlevel 1 (
  echo Python not found. Please install Python 3.9+ and add to PATH.
  exit /b 1
)

python -m venv .venv
call .venv\Scripts\activate.bat

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install --upgrade pip
pip install -r requirements.txt

echo Created venv and installed dependencies.

popd
